/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.sun.dtv.ui;

/**
 *The aim of this interface is to define functionality for the layout of strings
 * and their rendering on the screen. The string to be rendered may contain
 * besides its actual content also meta information e.g. about font, color,
 * style and text formatting. It is out of scope of this interface though to
 * force appropriate functionality for this. An implementing default text layout
 * manager could implement just the render method as requested by this
 * interface, while more sophisticated layout managers could add many methods in
 * order to process meta information, e.g. changing colors, fonts, styles, force
 * line breaks etc
 *
 * @author Rafael da Silva Almeida --- www.rafaelalmeida.net
 */
public interface TextLayoutManager {

    /**
     *
     * @param text - the string to be rendered.
     * @param g - the graphics context. This includes of course also a clipping rectangle, which should be respected as borders within which the rendering is permitted. An insets parameter not equal to null must be additionally taken into account.
     * @param component - the ViewOnlyComponent into which to render.
     * @param insets - the insets to define the area in which the text should be laid out. This parameter can also be null: in this case the ViewOnlyComponent parameter defines the borders by its bounds.
     */
    void render(String text, com.sun.dtv.lwuit.Graphics g, ViewOnlyComponent component, java.awt.Insets insets);

}
